package com.woniuxy.controller;

import com.woniuxy.entity.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author 佘赛飞
 * @create 2021 -11 -18 10:28 PM
 */
@Controller
@RequestMapping("/object")
public class ObjectController {
    @RequestMapping("/addObjectStudent")
    public ModelAndView addObjectStudent(Student student) {

        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("student", "传入的对象参数为：" + student);
        modelAndView.setViewName("objectview");
        return modelAndView;
    }
}
